package com.cloud.commons.utils.message;

public class ResultUtil {


    //当正确时返回的值
    public static Result success(Integer code,String msg, Object data){
        Result result = new Result();
        result.setCode(code);
        result.setMsg(msg);
        result.setData(data);
        return result;
    }

    //当错误时返回的值
    public static Result<?> error(int code, String msg){
        Result result = new Result();
        result.setCode(code);
        result.setMsg(msg);
        return result;
    }
}
